<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
    <script type="text/javascript" src="./jquery-2.1.1/jquery.js"></script>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>

  <body>
  <input type="text" id="email" value="wea@dsad.com">
  <div id="msg"></div>
    <script type="text/javascript">
        $(function () {

                $("#email").blur(function () {
                    var email=this.value;
                    console.log(email);
                    var es1= email.split("@");
                    console.log(es1);
                    if(es1.length==2){
                        var es2=es1[1].split(".");
                        console.log(es2);
                        if(es2.length<=1){
                            $("#msg").html("请输入有效邮箱1");
                        }
                    }else {
                        $("#msg").html("请输入有效邮箱2");
                    }
                })
            }
        )
    </script>
    <form action="./fenyeAction">
    <input type="hidden" name="current" value="1">
    <input type="submit" value="登陆">
    </form>
  </body>
</html>
